package com.jianyun.jyzs.presenter;

import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter;
import com.jianyun.jyzs.bean.SignResult;
import com.jianyun.jyzs.model.SignModel;
import com.jianyun.jyzs.model.imdoel.ISignModel;
import com.jianyun.jyzs.view.iview.ISignView;

import java.util.HashMap;

/**
 * Created by yangshijun on 2018/5/30.
 */

public class SginPresenter extends MvpBasePresenter<ISignView> {
    public void startSign(HashMap<String, String> map){
        if (!isViewAttached())return;
        getView().showLoading();
        SignModel.getInstance().startSign(map, new ISignModel.OnSignListener() {
            @Override
            public void onSuccess(SignResult signResult) {
                getView().onSignSuccess(signResult);
            }

            @Override
            public void onFailed(String msg) {
                getView().hintLoading();
                getView().onFailed(msg);
            }
        });
    }
}
